#include <iostream>
using namespace std;
#include <algorithm>
#include <vector>
#include <functional>

class Myprint
{
public:
    void operator()(int a)
    {
        cout << a << endl;
    }
};

int main()
{
    vector<int> v;

    for (int i = 0; i < 10; ++i)
    {
        v.push_back(i);
    }

    random_shuffle(v.begin(), v.end());

    for_each(v.begin(), v.end(), Myprint());
}